Determines whether the
IDictionary contains an element with the specified key.
Syntax
Visual Basic (Declaration) | |
---|
Public Function ContainsKey( _
ByVal key As TKey _
) As Boolean |
Parameters
- key
Exceptions
Example
Library/Library.Test/TestLurchTable.cs
C# | Copy Code |
---|
var test = new LurchTableTest<string, string>(StringComparer.OrdinalIgnoreCase);
test["a"] = "b";
Assert.IsTrue(test.ContainsKey("A"));
test = new LurchTableTest<string, string>(StringComparer.OrdinalIgnoreCase);
test["a"] = "b";
Assert.IsTrue(test.ContainsKey("A")); |
VB.NET | Copy Code |
---|
Dim test As var = New LurchTableTest(Of String, String)(StringComparer.OrdinalIgnoreCase)
test("a") = "b"
Assert.IsTrue(test.ContainsKey("A"))
test = New LurchTableTest(Of String, String)(StringComparer.OrdinalIgnoreCase)
test("a") = "b"
Assert.IsTrue(test.ContainsKey("A")) |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also